package top.ajunnihao.core.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import top.ajunnihao.core.entity.Order;
import top.ajunnihao.core.mapper.OrderMapper;
import top.ajunnihao.core.service.OrderService;

import java.util.List;

/**
 * <p>
 * 订单业务接口实现类
 * </p>
 */
@Service
public class OrderServiceImpl extends ServiceImpl<OrderMapper, Order> implements OrderService {

    @Autowired
    private OrderMapper orderMapper;

    @Override
    public List<Order> listOrderAndSiteName(IPage<Order> page, Long userId) {
        return orderMapper.selectOrderAndSiteName(page, userId);
    }

    @Override
    public List<Order> listAllOrderAndSiteName(IPage<Order> page) {
        return orderMapper.selectAllOrderAndSiteName(page);
    }

    @Override
    public List<Order> queryByCondition(IPage<Order> orderPage, String siteName) {
        return orderMapper.selectOrderByQuery(orderPage, siteName);
    }

}
